<?php
/**
 * 前台验证码控制类
 */
require_once (HOME . 'include/base/FrontendController.php');
class captcha extends FrontendController {
	function index() {
		import ( 'library/captcha.php' );
// 		session_start ();
		$captcha = new SimpleCaptcha();
		$captcha->wordsFile = '';
		$captcha->minWordLength = 6;
		$captcha->maxWordLength =6;
		$captcha->fonts = array(
        'Antykwa'  => array('spacing' => -1.8, 'minSize' => 17, 'maxSize' => 25, 'font' => 'AntykwaBold.ttf'),
        'Candice'  => array('spacing' =>-1.5,'minSize' => 18, 'maxSize' => 26, 'font' => 'Candice.ttf'),
        'DingDong' => array('spacing' => -2, 'minSize' => 14, 'maxSize' => 25, 'font' => 'Ding-DongDaddyO.ttf'),
        'Duality'  => array('spacing' => -2, 'minSize' => 20, 'maxSize' => 32, 'font' => 'Duality.ttf'),
        'Heineken' => array('spacing' => -2, 'minSize' => 14, 'maxSize' => 30, 'font' => 'Heineken.ttf'),
        'Jura'     => array('spacing' => -2, 'minSize' => 18, 'maxSize' => 27, 'font' => 'Jura.ttf'),
        'StayPuft' => array('spacing' =>-1.5,'minSize' => 18, 'maxSize' => 27, 'font' => 'StayPuft.ttf'),
        'Times'    => array('spacing' => -2, 'minSize' => 18, 'maxSize' => 30, 'font' => 'TimesNewRomanBold.ttf'),
        'VeraSans' => array('spacing' => -1, 'minSize' => 15, 'maxSize' => 23, 'font' => 'VeraSansBold.ttf'),
    );
		$captcha->width =120;
		$captcha->height = 48;
		$captcha->CreateImage();
	}
}